package test;

public class TimeCounting {
    public static void main(String[] args) throws InterruptedException {
        long start = System.currentTimeMillis();
        while (true) {
            Thread.sleep(1000);
            long currentTime = System.currentTimeMillis();
            Long time = currentTime - start;
            System.out.println("time = " + time / 1000 + "秒");

        }
    }
}
